<%#
 Copyright 2013-2020 the original author or authors from the JHipster project.

 This file is part of the JHipster project, see https://www.jhipster.tech/
 for more information.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-%>
# ===================================================================
# Spring Cloud <% if (serviceDiscoveryType === 'consul') { %>Consul <% } %>Config bootstrap configuration for the "dev" profile
# In prod profile, properties will be overwritten by the ones defined in bootstrap-prod.yml
# ===================================================================
<%_ if (serviceDiscoveryType === 'eureka') { _%>

jhipster:
    registry:
        password: admin
<%_ } _%>

spring:
    application:
        name: <%= baseName %>
    profiles:
        # The commented value for `active` can be replaced with valid Spring profiles to load.
        # Otherwise, it will be filled in by <%= buildTool %> when building the JAR file
        # Either way, it can be overridden by `--spring.profiles.active` value passed in the commandline or `-Dspring.profiles.active` set in `JAVA_OPTS`
        active: #spring.profiles.active#
    cloud:
        <%_ if (serviceDiscoveryType === 'consul') { _%>
        consul:
            config:
                fail-fast: false # if not in "prod" profile, do not force to use Spring Cloud Config
                format: yaml
                profile-separator: "-"
            discovery:
                tags:
                    - profile=${spring.profiles.active}
                    - version=#project.version#
                    - git-version=${git.commit.id.describe:}
                    - git-commit=${git.commit.id.abbrev:}
                    - git-branch=${git.branch:}
            host: localhost
            port: 8500
        <%_ } _%>
        <%_ if (serviceDiscoveryType === 'eureka') { _%>
        config:
            fail-fast: false # if not in "prod" profile, do not force to use Spring Cloud Config
            uri: http://admin:${jhipster.registry.password}@localhost:8761/config
            # name of the config server's property source (file.yml) that we want to use
            name: <%= baseName %>
            profile: dev # profile(s) of the property source
            label: master # toggle to switch to a different version of the configuration as stored in git
            # it can be set to any label, branch or commit of the configuration source Git repository
        <%_ } _%>
